package com.is.control;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.*;
import java.text.*;
import com.is.model.CourseScore;
import com.is.model.Student;
import com.is.util.DateTime;

public class Test {
	//用于测试方法
	
		//测试
		    public static void main(String[] args) {

		        String[] a1 = {"保定","何子安","保于小云","刘帝","刘何保定子安","刘","刘娜","家强","刘博"}; 
		        getSortOfChinese(a1);
		        for (int i = 0; i < a1.length; i++) {
		            System.out.println(a1[i]);
		        }
		    }
		/**
		 * 
		 * @param a String[]
		 * @return String[]
		 */
		    public static String[] getSortOfChinese(String[] a) {
		        // Collator 类是用来执行区分语言环境这里使用CHINA
		        Comparator cmp = Collator.getInstance(java.util.Locale.CHINA);

		        // JDKz自带对数组进行排序。
		        Arrays.sort(a, cmp);
		        return a;
		}

//		List<CourseScore> css = new ArrayList<CourseScore>();
//		for(int i =1;i<4;i++){
//		    CourseScore cs = new CourseScore();
//		     cs.setCourseId(1);
//		     cs.setDailyScore("33");
//		     cs.setFinalScore("499");
//		     cs.setMidtermScore("55");
//		     cs.setStuId(i);
//		     cs.setStuyear(i);
//		     css.add(cs);
//		}
//		
//		if(CourseScoreControl.updateCourseScore(css)){
//			System.out.println("Yes");
//		}
//		
//		if(CourseScoreControl.isInserCourseScoreByStuyearAndCourseId(10, 1)){
//			System.out.println("DDD");
//		}else{
//			System.out.println("dfsf");
//		}
//		
//	    System.out.println(DictationControl.getCountByLevelAndStuIdAndCourseId(1, "A", 2, 2));
//	    String na[] = {"印度","巴基斯坦","古巴","也门","哈萨克斯坦"};
//	    
//	    Student s = new Student();
//	 for(int i=2;i<15;i++){
//	     Random rand = new Random();
//		s.setPassportName("STU"+i);
//		s.setChineseName("STU"+i);
//		s.setPicPath("");
//		s.setNationality(na[Math.abs(rand.nextInt())%5]);
//		s.setNationalityEn("");
//		s.setSex("1");
//		s.setBirthday(DateTime.SimpleDate());
//		s.setClassId(Math.abs(rand.nextInt())%5+1+"");
//		s.setPassportNumber("");
//		s.setCscNumber("");
//		s.setScholarshipType("");
//		s.setLevel("");
//		s.setDuration("");
//		s.setUniversity("");
//		s.setMajor("");
//		s.setVisaApplicationPath("");
//		s.setAdmissionPath("");
//		s.setPassportPath("");
//		s.setChineseVisaPath("");
//		StudentControl.insertStudent(s);
//	 }
//		int b=4,c=5;
//		float a= (float)b/3+(float)c/2+9;
//		System.out.println(a);
//	}
		
//		LinkedHashMap<String, String> attOptions1 = new LinkedHashMap<String, String>();
//		attOptions1.put("getTeacherName", "姓名");
//		attOptions1.put("getCourseName","课程");
//		attOptions1.put("getClassName","班级");
//		attOptions1.put("getTotalWork","工作量(课时)");
//		attOptions1.put("getEW","额外");
//		attOptions1.put("getQQ","缺勤");
//		attOptions1.put("getQJ","请假");
//		for(Map.Entry<String, String> mi:attOptions1.entrySet()){
//			System.out.println(mi.getKey()+"   "+mi.getValue());
//		}
//		System.out.println("--------------------------------------------------");
//		HashMap<String, String> attOptions = new HashMap<String, String>();
//		attOptions.put("getTeacherName", "姓名");
//		attOptions.put("getCourseName","课程");
//		attOptions.put("getClassName","班级");
//		attOptions.put("getTotalWork","工作量(课时)");
//		attOptions.put("getEW","额外");
//		attOptions.put("getQQ","缺勤");
//		attOptions.put("getQJ","请假");
//		for(Map.Entry<String, String> mi:attOptions.entrySet()){
//			System.out.println(mi.getKey()+"   "+mi.getValue());
//		}
	}

